﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Web.View.t211Menu.Default" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>t211</title>
    <script src="/View/js/Alert.js" type="text/javascript"></script> 
    <script type="text/javascript">
        function SetWinData(index) {
            document.getElementById("Hid").value = t211_MainStore.getAt(index).get('t211_01');
            
			Txtt211_02.setValue(t211_MainStore.getAt(index).get('t211_02'));
			Txtt211_03.setValue(t211_MainStore.getAt(index).get('t211_03'));
			Txtt211_04.setValue(t211_MainStore.getAt(index).get('t211_04'));
			Txtt211_05.setValue(t211_MainStore.getAt(index).get('t211_05'));
			Txtt211_06.setValue(t211_MainStore.getAt(index).get('t211_06'));
			Txtt211_07.setValue(t211_MainStore.getAt(index).get('t211_07'));
			Txtt211_08.setValue(t211_MainStore.getAt(index).get('t211_08'));
			Txtt211_09.setValue(t211_MainStore.getAt(index).get('t211_09'));
			Txtt211_10.setValue(t211_MainStore.getAt(index).get('t211_10'));
			Txtt211_11.setValue(t211_MainStore.getAt(index).get('t211_11'));
			Txtt211_12.setValue(t211_MainStore.getAt(index).get('t211_12'));
			Txtt211_13.setValue(t211_MainStore.getAt(index).get('t211_13'));
			Txtt211_14.setValue(t211_MainStore.getAt(index).get('t211_14'));
			Txtt211_15.setValue(t211_MainStore.getAt(index).get('t211_15'));
			Txtt211_16.setValue(t211_MainStore.getAt(index).get('t211_16'));
			Txtt211_17.setValue(t211_MainStore.getAt(index).get('t211_17'));
			Txtt211_18.setValue(t211_MainStore.getAt(index).get('t211_18'));
			Txtt211_19.setValue(t211_MainStore.getAt(index).get('t211_19'));
			Txtt211_20.setValue(t211_MainStore.getAt(index).get('t211_20'));
			Txtt211_21.setValue(t211_MainStore.getAt(index).get('t211_21'));
			Txtt211_22.setValue(t211_MainStore.getAt(index).get('t211_22'));
			Txtt211_23.setValue(t211_MainStore.getAt(index).get('t211_23'));
			Txtt211_24.setValue(t211_MainStore.getAt(index).get('t211_24'));
			Txtt211_25.setValue(t211_MainStore.getAt(index).get('t211_25'));
			Txtt211_26.setValue(t211_MainStore.getAt(index).get('t211_26'));
			Txtt211_27.setValue(t211_MainStore.getAt(index).get('t211_27'));
			Txtt211_28.setValue(t211_MainStore.getAt(index).get('t211_28'));
			Txtt211_29.setValue(t211_MainStore.getAt(index).get('t211_29'));
			Txtt211_30.setValue(t211_MainStore.getAt(index).get('t211_30'));
			Txtt211_31.setValue(t211_MainStore.getAt(index).get('t211_31'));
			Txtt211_32.setValue(t211_MainStore.getAt(index).get('t211_32'));
			Txtt211_33.setValue(t211_MainStore.getAt(index).get('t211_33'));
			Txtt211_34.setValue(t211_MainStore.getAt(index).get('t211_34'));
			Txtt211_35.setValue(t211_MainStore.getAt(index).get('t211_35'));
			Txtcollection_time.setValue(t211_MainStore.getAt(index).get('collection_time'));

            t211_Win.show();
        }
    </script>
</head>
<body>
    <form id="MainForm" runat="server">
    <ext:ResourceManager ID="MainResourceMgr" runat="server" />
    <!--用来导出到Excel的数据源-->
    <ext:Hidden ID="ExcelGridData" runat="server" />
    <!--t211表页面主数据元，自动生成-->
    <ext:Store runat="server" ID="t211_MainStore" OnRefreshData="t211_DataBind" AutoLoad="true">
        <Proxy>
            <ext:PageProxy />
        </Proxy>
        <Reader>
            <ext:JsonReader IDProperty="t211_01">
                <Fields>
                    
					<ext:RecordField Name="t211_01" />
					<ext:RecordField Name="t211_02" />
					<ext:RecordField Name="t211_03" />
					<ext:RecordField Name="t211_04" />
					<ext:RecordField Name="t211_05" />
					<ext:RecordField Name="t211_06" />
					<ext:RecordField Name="t211_07" />
					<ext:RecordField Name="t211_08" />
					<ext:RecordField Name="t211_09" />
					<ext:RecordField Name="t211_10" />
					<ext:RecordField Name="t211_11" />
					<ext:RecordField Name="t211_12" />
					<ext:RecordField Name="t211_13" />
					<ext:RecordField Name="t211_14" />
					<ext:RecordField Name="t211_15" />
					<ext:RecordField Name="t211_16" />
					<ext:RecordField Name="t211_17" />
					<ext:RecordField Name="t211_18" />
					<ext:RecordField Name="t211_19" />
					<ext:RecordField Name="t211_20" />
					<ext:RecordField Name="t211_21" />
					<ext:RecordField Name="t211_22" />
					<ext:RecordField Name="t211_23" />
					<ext:RecordField Name="t211_24" />
					<ext:RecordField Name="t211_25" />
					<ext:RecordField Name="t211_26" />
					<ext:RecordField Name="t211_27" />
					<ext:RecordField Name="t211_28" />
					<ext:RecordField Name="t211_29" />
					<ext:RecordField Name="t211_30" />
					<ext:RecordField Name="t211_31" />
					<ext:RecordField Name="t211_32" />
					<ext:RecordField Name="t211_33" />
					<ext:RecordField Name="t211_34" />
					<ext:RecordField Name="t211_35" />
					<ext:RecordField Name="collection_time" />

                </Fields>
            </ext:JsonReader>
        </Reader> 
        <BaseParams>
            <ext:Parameter Name="start" Value="0" Mode="Raw">
            </ext:Parameter>
            <ext:Parameter Name="limit" Value="15" Mode="Raw">
            </ext:Parameter>
        </BaseParams>
    </ext:Store>
    <!--t211页面主表格-->
    <ext:Viewport ID="MainViewPort" runat="server">
        <Items>
            <ext:FitLayout>
                <Items>
                    <ext:GridPanel ID="t211_Grid" Layout="fit" TrackMouseOver="true" runat="server" StoreID="t211_MainStore"
                        StripeRows="true" Header="false" Border="false" Collapsible="true">
                        <TopBar>
                            <ext:Toolbar ID="MainToolBar" runat="server">
                                <Items>
                                    <ext:Button ID="BtnAdd" runat="server" Text="添加" Icon="Add">
                                        <Listeners>
                                            <Click Handler="#{t211_MainForm}.getForm().reset();#{Hid}.setValue('');#{t211_Win}.show();" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:Button ID="BtnDel" runat="server" Text="删除" Icon="Delete">
                                        <DirectEvents>
                                            <Click OnEvent="BtnDel_Click">
                                                <Confirmation ConfirmRequest="true" Title="确认" Message="确实要删除吗?" />
                                                <EventMask ShowMask="true" Msg="正在删除数据，请等候 ..." />
                                            </Click>
                                        </DirectEvents>
                                        <Listeners>
                                            <Click Handler="if(#{t211_Grid}.getSelectionModel().getCount()<=0) {TellAlert('请选择要删除的记录');return false;}" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:ToolbarSeparator />
                                    <ext:Button ID="BtnReload" runat="server" Text="重新加载" Icon="Reload">
                                        <Listeners>
                                            <Click Handler="#{t211_MainStore}.reload();" />
                                        </Listeners>
                                    </ext:Button>
                                    <ext:ToolbarFill />
                                    <ext:Button ID="BtnToExcel" runat="server" Text="To Excel" AutoPostBack="true" OnClick="BtnSaveToExcel"
                                        Icon="PageExcel">
                                        <Listeners>
                                            <Click Handler="#{ExcelGridData}.setValue(Ext.encode(t211_Grid.getRowsValues(false)));" />
                                        </Listeners>
                                        <ToolTips>
                                            <ext:ToolTip Title="将当前页内容存储为Excel文件">
                                            </ext:ToolTip>
                                        </ToolTips>
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                        <ColumnModel ID="t211_ColumnMode" runat="server">
                            <Columns>
                                <ext:RowNumbererColumn Width="20" />
                                <ext:Column Header="主键" Sortable="true" Hidden="true" DataIndex="t211_01" />
                                
								<ext:Column Header="T211_02" Sortable="true" DataIndex="t211_02" />
								<ext:Column Header="T211_03" Sortable="true" DataIndex="t211_03" />
								<ext:Column Header="T211_04" Sortable="true" DataIndex="t211_04" />
								<ext:Column Header="T211_05" Sortable="true" DataIndex="t211_05" />
								<ext:Column Header="T211_06" Sortable="true" DataIndex="t211_06" />
								<ext:Column Header="T211_07" Sortable="true" DataIndex="t211_07" />
								<ext:Column Header="T211_08" Sortable="true" DataIndex="t211_08" />
								<ext:Column Header="T211_09" Sortable="true" DataIndex="t211_09" />
								<ext:Column Header="T211_10" Sortable="true" DataIndex="t211_10" />
								<ext:Column Header="T211_11" Sortable="true" DataIndex="t211_11" />
								<ext:Column Header="T211_12" Sortable="true" DataIndex="t211_12" />
								<ext:Column Header="T211_13" Sortable="true" DataIndex="t211_13" />
								<ext:Column Header="T211_14" Sortable="true" DataIndex="t211_14" />
								<ext:Column Header="T211_15" Sortable="true" DataIndex="t211_15" />
								<ext:Column Header="T211_16" Sortable="true" DataIndex="t211_16" />
								<ext:Column Header="T211_17" Sortable="true" DataIndex="t211_17" />
								<ext:Column Header="T211_18" Sortable="true" DataIndex="t211_18" />
								<ext:Column Header="T211_19" Sortable="true" DataIndex="t211_19" />
								<ext:Column Header="T211_20" Sortable="true" DataIndex="t211_20" />
								<ext:Column Header="T211_21" Sortable="true" DataIndex="t211_21" />
								<ext:Column Header="T211_22" Sortable="true" DataIndex="t211_22" />
								<ext:Column Header="T211_23" Sortable="true" DataIndex="t211_23" />
								<ext:Column Header="T211_24" Sortable="true" DataIndex="t211_24" />
								<ext:Column Header="T211_25" Sortable="true" DataIndex="t211_25" />
								<ext:Column Header="T211_26" Sortable="true" DataIndex="t211_26" />
								<ext:Column Header="T211_27" Sortable="true" DataIndex="t211_27" />
								<ext:Column Header="T211_28" Sortable="true" DataIndex="t211_28" />
								<ext:Column Header="T211_29" Sortable="true" DataIndex="t211_29" />
								<ext:Column Header="T211_30" Sortable="true" DataIndex="t211_30" />
								<ext:Column Header="T211_31" Sortable="true" DataIndex="t211_31" />
								<ext:Column Header="T211_32" Sortable="true" DataIndex="t211_32" />
								<ext:Column Header="T211_33" Sortable="true" DataIndex="t211_33" />
								<ext:Column Header="T211_34" Sortable="true" DataIndex="t211_34" />
								<ext:Column Header="T211_35" Sortable="true" DataIndex="t211_35" />
								<ext:Column Header="COLLECTION_TIME" Sortable="true" DataIndex="collection_time" />

                            </Columns>
                        </ColumnModel>
                        <Listeners>
                            <RowDblClick Handler="SetWinData(rowIndex);" />
                        </Listeners>
                        <Plugins>
                            <ext:GridFilters runat="server" FiltersText="查找" ID="t211_Filter">
                                <Filters>
                                    
								<ext:StringFilter DataIndex="t211_02" />
								<ext:StringFilter DataIndex="t211_03" />
								<ext:StringFilter DataIndex="t211_04" />
								<ext:StringFilter DataIndex="t211_05" />
								<ext:StringFilter DataIndex="t211_06" />
								<ext:StringFilter DataIndex="t211_07" />
								<ext:StringFilter DataIndex="t211_08" />
								<ext:StringFilter DataIndex="t211_09" />
								<ext:StringFilter DataIndex="t211_10" />
								<ext:StringFilter DataIndex="t211_11" />
								<ext:StringFilter DataIndex="t211_12" />
								<ext:StringFilter DataIndex="t211_13" />
								<ext:StringFilter DataIndex="t211_14" />
								<ext:StringFilter DataIndex="t211_15" />
								<ext:StringFilter DataIndex="t211_16" />
								<ext:StringFilter DataIndex="t211_17" />
								<ext:StringFilter DataIndex="t211_18" />
								<ext:StringFilter DataIndex="t211_19" />
								<ext:StringFilter DataIndex="t211_20" />
								<ext:StringFilter DataIndex="t211_21" />
								<ext:StringFilter DataIndex="t211_22" />
								<ext:StringFilter DataIndex="t211_23" />
								<ext:StringFilter DataIndex="t211_24" />
								<ext:StringFilter DataIndex="t211_25" />
								<ext:StringFilter DataIndex="t211_26" />
								<ext:StringFilter DataIndex="t211_27" />
								<ext:StringFilter DataIndex="t211_28" />
								<ext:StringFilter DataIndex="t211_29" />
								<ext:StringFilter DataIndex="t211_30" />
								<ext:StringFilter DataIndex="t211_31" />
								<ext:StringFilter DataIndex="t211_32" />
								<ext:StringFilter DataIndex="t211_33" />
								<ext:StringFilter DataIndex="t211_34" />
								<ext:StringFilter DataIndex="t211_35" />
								<ext:StringFilter DataIndex="collection_time" />

                                </Filters>
                            </ext:GridFilters>
                        </Plugins>
                        <LoadMask ShowMask="true" Msg="正在加载..." />
                        <SelectionModel>
                            <ext:CheckboxSelectionModel ID="CheckBoxGrid" runat="server" />
                        </SelectionModel>
                        <BottomBar>
                            <ext:PagingToolbar ID="PagingToolBar" StoreID="t211_MainStore" PageSize="15" runat="server" />
                        </BottomBar>
                    </ext:GridPanel>
                </Items>
            </ext:FitLayout>
        </Items>
    </ext:Viewport>
    
    <!--t211表修改，添加主窗体-->
    <ext:Window ID="t211_Win" Collapsible="true" Hidden="true" Modal="true"
        Maximizable="true" runat="server" Title="添加/修改记录" Icon="WorldEdit" Width="630" AutoHeight="true"
        Resizable="true">
        <Items>
            <ext:Hidden ID="Hid" runat="server">
            </ext:Hidden>
            <ext:FormPanel ID="t211_MainForm" LabelWidth="65" Frame="true" runat="server"
                Border="false" Height="540" Padding="5" Icon="UserAdd" Layout="Column">
                <Items>
                    <ext:Panel runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form">
                        <Items>
                            
							<ext:TextField ID="Txtt211_02" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_02" />
							<ext:TextField ID="Txtt211_04" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_04" />
							<ext:TextField ID="Txtt211_06" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_06" />
							<ext:TextField ID="Txtt211_08" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_08" />
							<ext:TextField ID="Txtt211_10" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_10" />
							<ext:TextField ID="Txtt211_12" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_12" />
							<ext:TextField ID="Txtt211_14" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_14" />
							<ext:TextField ID="Txtt211_16" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_16" />
							<ext:TextField ID="Txtt211_18" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_18" />
							<ext:TextField ID="Txtt211_20" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_20" />
							<ext:TextField ID="Txtt211_22" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_22" />
							<ext:TextField ID="Txtt211_24" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_24" />
							<ext:TextField ID="Txtt211_26" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_26" />
							<ext:TextField ID="Txtt211_28" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_28" />
							<ext:TextField ID="Txtt211_30" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_30" />
							<ext:TextField ID="Txtt211_32" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_32" />
							<ext:TextField ID="Txtt211_34" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_34" />
							<ext:TextField ID="Txtcollection_time" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="COLLECTION_TIME" />

                        </Items>
                    </ext:Panel>
                    <ext:Panel runat="server" Border="false" Header="false" ColumnWidth=".5" Layout="Form">
                        <Items> 
                            
							<ext:TextField ID="Txtt211_03" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_03" />
							<ext:TextField ID="Txtt211_05" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_05" />
							<ext:TextField ID="Txtt211_07" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_07" />
							<ext:TextField ID="Txtt211_09" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_09" />
							<ext:TextField ID="Txtt211_11" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_11" />
							<ext:TextField ID="Txtt211_13" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_13" />
							<ext:TextField ID="Txtt211_15" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_15" />
							<ext:TextField ID="Txtt211_17" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_17" />
							<ext:TextField ID="Txtt211_19" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_19" />
							<ext:TextField ID="Txtt211_21" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_21" />
							<ext:TextField ID="Txtt211_23" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_23" />
							<ext:TextField ID="Txtt211_25" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_25" />
							<ext:TextField ID="Txtt211_27" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_27" />
							<ext:TextField ID="Txtt211_29" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_29" />
							<ext:TextField ID="Txtt211_31" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_31" />
							<ext:TextField ID="Txtt211_33" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_33" />
							<ext:TextField ID="Txtt211_35" AnchorHorizontal="92%" runat="server" AllowBlank="false" EmptyText="该项不可为空" FieldLabel="T211_35" />

                        </Items>
                    </ext:Panel>
                </Items>
            </ext:FormPanel>
        </Items>
        <Buttons> 
            <ext:Button Text="提交" ID="BtnSave" runat="server" Icon="Disk">
                <DirectEvents>
                    <Click OnEvent="BtnSave_Click">
                        <EventMask ShowMask="true" Msg="正在提交，请等候 ..."  />
                    </Click>
                </DirectEvents>
                <Listeners>
                    <Click Handler="if (#{t211_MainForm}.getForm().isValid()) {;}else{Ext.Msg.show({icon: Ext.MessageBox.ERROR, msg: '您填写的信息不正确，请您确认！', buttons:Ext.Msg.OK});return false;}" />
                </Listeners>
            </ext:Button>
            <ext:Button Text="取消" ID="BtnConcel" Icon="Delete">
                <Listeners>
                    <Click Handler="#{t211_Win}.hide();" />
                </Listeners>
            </ext:Button>
        </Buttons>
    </ext:Window>
    </form>
</body>
</html>
